package it.eng.get.pdfwe.jr;

import java.util.ArrayList;
import java.util.List;

import net.sf.jasperreports.engine.JasperPrint;

/**
 * @author <div style="width: 100%; height: 2em;
 * background-repeat: repeat-x; 
 * background-image: url(http://www.mysoftworks.net/images/author_back.gif);" >
 * <a style="float: right; font-size: .9em; margin: 1.2em .5em .1em .1em; color: #658A16; color: 658A16; font-family: helvetica; font-weight: bold; text-decoration: none" href="http://www.mysoftworks.net">
 * Antonio Giovannetti for Engineering</a>
 * </div>
 */
public class JasperPrintContainer {
	private static List<JasperPrint> _jasperPrints = new ArrayList<JasperPrint>();
	
	public static synchronized void addJasperPrint(JasperPrint print) {
		for (JasperPrint jp : _jasperPrints) {
			if (jp.getName()!=null && jp.getName().equals(print.getName())) {
				return;
			}
		}
		_jasperPrints.add(print);
	}

	public static synchronized List<JasperPrint> getList() {
		return _jasperPrints;
	}

	
	
}
